Optimal. Leaf size=27 \[ \frac{A \tan (c+d x)}{d}+\frac{B \tanh ^{-1}(\sin (c+d x))}{d}+C x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0540409, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {3021, 2735, 3770} \[ \frac{A \tan (c+d x)}{d}+\frac{B \tanh ^{-1}(\sin (c+d x))}{d}+C x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3021
Rule 2735
Rule 3770
Rubi steps
\begin{align*} \int \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx &=\frac{A \tan (c+d x)}{d}+\int (B+C \cos (c+d x)) \sec (c+d x) \, dx\\ &=C x+\frac{A \tan (c+d x)}{d}+B \int \sec (c+d x) \, dx\\ &=C x+\frac{B \tanh ^{-1}(\sin (c+d x))}{d}+\frac{A \tan (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0185488, size = 27, normalized size = 1. \[ \frac{A \tan (c+d x)}{d}+\frac{B \tanh ^{-1}(\sin (c+d x))}{d}+C x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.035, size = 41, normalized size = 1.5 \begin{align*} Cx+{\frac{A\tan \left ( dx+c \right ) }{d}}+{\frac{B\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{Cc}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.972369, size = 62, normalized size = 2.3 \begin{align*} \frac{2 \,{\left (d x + c\right )} C + B{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A \tan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.94841, size = 193, normalized size = 7.15 \begin{align*} \frac{2 \, C d x \cos \left (d x + c\right ) + B \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - B \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, A \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (A + B \cos{\left (c + d x \right )} + C \cos ^{2}{\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.26282, size = 95, normalized size = 3.52 \begin{align*} \frac{{\left (d x + c\right )} C + B \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - B \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{2 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]